package com.scrm.server.wx.cp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.scrm.api.wx.cp.entity.WxFissionTask;
import com.scrm.api.wx.cp.entity.WxFissionTaskCustomerDetail;
import com.scrm.api.wx.cp.vo.FissionInviteConditionVO;
import com.scrm.api.wx.cp.vo.IdVO;
import com.scrm.api.wx.cp.vo.WxFissionTaskCustomerDetailH5VO;
import com.scrm.api.wx.cp.vo.WxFissionTaskCustomerDetailVO;

import java.util.List;

/**
 * 企微应用宝-领奖信息 服务类
 * @author xxh
 * @since 2022-03-21
 */
public interface IWxFissionTaskCustomerDetailService extends IService<WxFissionTaskCustomerDetail> {

    /**
     * 校验是否存在
     * @author xxh
     * @date 2022-03-21
     * @param id 企微应用宝-领奖信息id
     * @return com.scrm.api.wx.cp.entity.WxFissionPrize
     */
    WxFissionTaskCustomerDetail checkExists(String id);

    /**
     * 根据任务和客户id初始化详情信息
     * @param wxFissionTask
     * @param extCustomerId
     */
    void initDetails(WxFissionTask wxFissionTask, String extCustomerId);

    /**
     * 翻译
     * @param detail
     * @return
     */
    WxFissionTaskCustomerDetailVO translate(WxFissionTaskCustomerDetail detail);

    /**
     * 兑奖
     * @param dto
     */
    void price(IdVO dto);

    /**
     * 获取完成任务情况
     * @param vo
     * @return
     */
    List<WxFissionTaskCustomerDetailH5VO> getFinishDetails(FissionInviteConditionVO vo);

    /**
     * 客户变动，更新完成状态
     * @param extCorpId
     * @param customerExtId
     */
    void customerUpdate(String extCorpId, String customerExtId);

    /**
     * 更新某个客户的完成情况
     * @param extCorpId
     * @param taskId
     * @param extCustomerId
     */
    void updateFinishStatus(String extCorpId, String taskId, String extCustomerId);
}
